<?php

  function fecha($fecha){  
            list($ano,$mes,$dia)= explode("-", $fecha);
            $valor = explode(" ", $dia);
            $dia =  $valor[0];            
              $nueva =  mktime(0,0,0, $mes,$dia,$ano);
              $nuevafecha=date("d-M-Y",$nueva);
            
      return ($nuevafecha);            
}


?>
                        
                        
<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>
                        
                        <table border="0" cellspacing="0" cellpadding="0" width="50%" class="operadorServicio">
                            
                            <tr>
                                <td align="center">
                                    
                                    

<form  class="formGeneral" style="padding-top: 35px;" action="<?php echo url_for('prestamo/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<h1>    
<?php if (!$form->getObject()->isNew()){ ?>
<input type="hidden" name="sf_method" value="put" />
Modificado
<?php }else { ?>
Soliciud de Nuevo 
<?php } ?>
Prestamo
</h1>
    <?php echo $form;?>
  
    
<div id="formBottom" class="borderRadiusBottom10">    
    <?php echo $form->renderHiddenFields(false) ?>
    <input type="submit" value="Solicitar Prestamo" class="formBottomSubmit"/>
    <input type="reset" value="Limpiar Formulario"/>
    <?php if (!$form->getObject()->isNew()): ?>
    &nbsp;<?php echo link_to('Delete', 'prestamo/delete?id='.$form->getObject()->getId(), array('method' => 'delete', 'confirm' => 'Esta seguro?')) ?>
    <?php endif; ?>

    <div class="clear"></div>    
</div>

<div class="clear"></div> 


</form>
                                    
                                    
                                </td>
                            </tr>
                        </table>
 </td>
</tr>

</table>